﻿@using WI.CandidateManager.Common.Data.Enums
@model WI.CandidateManager.Common.Data.Entities.Coach

@{
    ViewBag.Title = "Edit User Profile";
}

@*@section script1{
    <script type="text/javascript">
        $(function phonenumber(inputtxt) {
            var phoneno = /^\d{9}$/;
            if (inputtxt.value.match(phoneno)) {
                return true;
            }
            else {
                alert("Not a valid Phone Number");
                return false;
            }
        });
    </script>
}*@

<h2>ChangeUserProfile</h2>

@using (Html.BeginForm("Edit", "Profile", new { @UserId = Model.Id }, FormMethod.Post))
{
    @Html.ValidationSummary(true)
    
    <table class="bordered">
        <tr>
            <td class="vertical-header">@Html.LabelFor(model => model.FullName)</td>
            <td>@Html.EditorFor(model => model.FullName, new { @class = "" })</td>
        </tr>
        <tr>
            <td class="vertical-header">@Html.LabelFor(model => model.ShortName)</td>
            <td>@Html.EditorFor(model => model.ShortName, new { @class = "" })</td>
        </tr>
        <tr>
            <td class="vertical-header">@Html.LabelFor(model => model.Email)</td>
            <td>@Html.EditorFor(model => model.Email, new { @class = "" })</td>
        </tr>
        <tr>
            <td class="vertical-header">@Html.LabelFor(model => model.Phone)</td>
            <td>@Html.EditorFor(model => model.Phone, new { @class = "" })</td>
        </tr>
        <tr>
            <td class="vertical-header">@Html.LabelFor(model => model.Gender)</td>
            <td>@Html.DropDownListFor(model => model.Gender, new SelectList(Enum.GetValues(typeof(Gender))))</td>
        </tr>
    </table>
    
    <p>
        @Html.ActionLink("Back", "Detail", "Profile", new { @class = "common-btn-large BlueColor" })
        <input class="common-btn-large BlueColor" type="submit" value="Save" />
    </p>
}
